package com.mxnet.chongjin.supoman.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * author: Administrator
 * email: lcj270018655@163.com
 * date: 2018/5/14
 */

public class RepairRecord implements Parcelable {

    /**
     * country : 新西兰
     * zipCode : 10099
     * robotNo : SPM15-B
     * salerName : 不仅仅是喜欢
     * declarationMemo : 零部件又坏了
     * city : 汉密尔顿
     * declarationNo : 2
     * customerName : 客户名称
     * robotImgUrl : 758A3E47A50F4CCB988B55C796BC41E3
     * imgResource : {"createTime":1526092237000,"fileType":"png","id":"758A3E47A50F4CCB988B55C796BC41E3","md5":"d0a5b5668430302ed177633e65aa318d","name":"服务_热门_1@3x.png","size":"70848","type":"robot","url":"robot/2018/05/12/B546FE16E0F747C8B3275CBBE093A7D2.png","userId":""}
     * resourceIdList :
     * maintenanceRecords : [{"changePartsList":"","createTime":1524644331000,"declarationNo":"2","id":"4","maintenanceMemo":"申请维修，等待受理","maintenanceTime":1524644329000,"resourceIdList":""},{"changePartsList":"","createTime":1524644401000,"declarationNo":"2","id":"5","maintenanceMemo":"维修已受理，等待上门","maintenanceTime":1524644398000,"resourceIdList":""}]
     * projectNo : saler2018000002SPM15-B1
     * distirct : 剑桥镇
     * createTime : 1524643903000
     * salerNo : saler2018000002
     * detailAddress : 怀卡托河
     * declarationStatus : dealing
     * id : 2
     * customerMobile : 187299009188
     */

    private String country;
    private String zipCode;
    private String robotNo;
    private String salerName;
    private String declarationMemo;
    private String city;
    private String declarationNo;
    private String customerName;
    private String robotImgUrl;
    private ImgResourceBean imgResource;
    private List<String> resourceIdList;
    private String projectNo;
    private String distirct;
    private long createTime;
    private String salerNo;
    private String detailAddress;
    private String declarationStatus;
    private String id;
    private String customerMobile;
    private List<MaintenanceRecordsBean> maintenanceRecords;

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getZipCode() {
        return zipCode;
    }

    public void setZipCode(String zipCode) {
        this.zipCode = zipCode;
    }

    public String getRobotNo() {
        return robotNo;
    }

    public void setRobotNo(String robotNo) {
        this.robotNo = robotNo;
    }

    public String getSalerName() {
        return salerName;
    }

    public void setSalerName(String salerName) {
        this.salerName = salerName;
    }

    public String getDeclarationMemo() {
        return declarationMemo;
    }

    public void setDeclarationMemo(String declarationMemo) {
        this.declarationMemo = declarationMemo;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getDeclarationNo() {
        return declarationNo;
    }

    public void setDeclarationNo(String declarationNo) {
        this.declarationNo = declarationNo;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public String getRobotImgUrl() {
        return robotImgUrl;
    }

    public void setRobotImgUrl(String robotImgUrl) {
        this.robotImgUrl = robotImgUrl;
    }

    public ImgResourceBean getImgResource() {
        return imgResource;
    }

    public void setImgResource(ImgResourceBean imgResource) {
        this.imgResource = imgResource;
    }

    public List<String> getResourceIdList() {
        return resourceIdList;
    }

    public void setResourceIdList(List<String> resourceIdList) {
        this.resourceIdList = resourceIdList;
    }

    public String getProjectNo() {
        return projectNo;
    }

    public void setProjectNo(String projectNo) {
        this.projectNo = projectNo;
    }

    public String getDistirct() {
        return distirct;
    }

    public void setDistirct(String distirct) {
        this.distirct = distirct;
    }

    public long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }

    public String getSalerNo() {
        return salerNo;
    }

    public void setSalerNo(String salerNo) {
        this.salerNo = salerNo;
    }

    public String getDetailAddress() {
        return detailAddress;
    }

    public void setDetailAddress(String detailAddress) {
        this.detailAddress = detailAddress;
    }

    public String getDeclarationStatus() {
        return declarationStatus;
    }

    public void setDeclarationStatus(String declarationStatus) {
        this.declarationStatus = declarationStatus;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCustomerMobile() {
        return customerMobile;
    }

    public void setCustomerMobile(String customerMobile) {
        this.customerMobile = customerMobile;
    }

    public List<MaintenanceRecordsBean> getMaintenanceRecords() {
        return maintenanceRecords;
    }

    public void setMaintenanceRecords(List<MaintenanceRecordsBean> maintenanceRecords) {
        this.maintenanceRecords = maintenanceRecords;
    }

    public static class ImgResourceBean implements Parcelable {
        /**
         * createTime : 1526092237000
         * fileType : png
         * id : 758A3E47A50F4CCB988B55C796BC41E3
         * md5 : d0a5b5668430302ed177633e65aa318d
         * name : 服务_热门_1@3x.png
         * size : 70848
         * type : robot
         * url : robot/2018/05/12/B546FE16E0F747C8B3275CBBE093A7D2.png
         * userId :
         */

        private long createTime;
        private String fileType;
        private String id;
        private String md5;
        private String name;
        private String size;
        private String type;
        private String url;
        private String userId;

        public long getCreateTime() {
            return createTime;
        }

        public void setCreateTime(long createTime) {
            this.createTime = createTime;
        }

        public String getFileType() {
            return fileType;
        }

        public void setFileType(String fileType) {
            this.fileType = fileType;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getMd5() {
            return md5;
        }

        public void setMd5(String md5) {
            this.md5 = md5;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getSize() {
            return size;
        }

        public void setSize(String size) {
            this.size = size;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public String getUserId() {
            return userId;
        }

        public void setUserId(String userId) {
            this.userId = userId;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeLong(this.createTime);
            dest.writeString(this.fileType);
            dest.writeString(this.id);
            dest.writeString(this.md5);
            dest.writeString(this.name);
            dest.writeString(this.size);
            dest.writeString(this.type);
            dest.writeString(this.url);
            dest.writeString(this.userId);
        }

        public ImgResourceBean() {
        }

        protected ImgResourceBean(Parcel in) {
            this.createTime = in.readLong();
            this.fileType = in.readString();
            this.id = in.readString();
            this.md5 = in.readString();
            this.name = in.readString();
            this.size = in.readString();
            this.type = in.readString();
            this.url = in.readString();
            this.userId = in.readString();
        }

        public static final Creator<ImgResourceBean> CREATOR = new Creator<ImgResourceBean>() {
            @Override
            public ImgResourceBean createFromParcel(Parcel source) {
                return new ImgResourceBean(source);
            }

            @Override
            public ImgResourceBean[] newArray(int size) {
                return new ImgResourceBean[size];
            }
        };
    }

    public static class MaintenanceRecordsBean implements Parcelable {
        /**
         * changePartsList :
         * createTime : 1524644331000
         * declarationNo : 2
         * id : 4
         * maintenanceMemo : 申请维修，等待受理
         * maintenanceTime : 1524644329000
         * resourceIdList :
         */

        private String changePartsList;
        private long createTime;
        private String declarationNo;
        private String id;
        private String maintenanceMemo;
        private long maintenanceTime;
        private List<String> resourceIdList;

        public String getChangePartsList() {
            return changePartsList;
        }

        public void setChangePartsList(String changePartsList) {
            this.changePartsList = changePartsList;
        }

        public long getCreateTime() {
            return createTime;
        }

        public void setCreateTime(long createTime) {
            this.createTime = createTime;
        }

        public String getDeclarationNo() {
            return declarationNo;
        }

        public void setDeclarationNo(String declarationNo) {
            this.declarationNo = declarationNo;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getMaintenanceMemo() {
            return maintenanceMemo;
        }

        public void setMaintenanceMemo(String maintenanceMemo) {
            this.maintenanceMemo = maintenanceMemo;
        }

        public long getMaintenanceTime() {
            return maintenanceTime;
        }

        public void setMaintenanceTime(long maintenanceTime) {
            this.maintenanceTime = maintenanceTime;
        }

        public List<String> getResourceIdList() {
            return resourceIdList;
        }

        public void setResourceIdList(List<String> resourceIdList) {
            this.resourceIdList = resourceIdList;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.changePartsList);
            dest.writeLong(this.createTime);
            dest.writeString(this.declarationNo);
            dest.writeString(this.id);
            dest.writeString(this.maintenanceMemo);
            dest.writeLong(this.maintenanceTime);
            dest.writeList(this.resourceIdList);
        }

        public MaintenanceRecordsBean() {
        }

        protected MaintenanceRecordsBean(Parcel in) {
            this.changePartsList = in.readString();
            this.createTime = in.readLong();
            this.declarationNo = in.readString();
            this.id = in.readString();
            this.maintenanceMemo = in.readString();
            this.maintenanceTime = in.readLong();
            this.resourceIdList = new ArrayList<>();
            in.readStringList(this.resourceIdList);
        }

        public static final Creator<MaintenanceRecordsBean> CREATOR = new Creator<MaintenanceRecordsBean>() {
            @Override
            public MaintenanceRecordsBean createFromParcel(Parcel source) {
                return new MaintenanceRecordsBean(source);
            }

            @Override
            public MaintenanceRecordsBean[] newArray(int size) {
                return new MaintenanceRecordsBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.country);
        dest.writeString(this.zipCode);
        dest.writeString(this.robotNo);
        dest.writeString(this.salerName);
        dest.writeString(this.declarationMemo);
        dest.writeString(this.city);
        dest.writeString(this.declarationNo);
        dest.writeString(this.customerName);
        dest.writeString(this.robotImgUrl);
        dest.writeParcelable(this.imgResource, flags);
        dest.writeList(this.resourceIdList);
        dest.writeString(this.projectNo);
        dest.writeString(this.distirct);
        dest.writeLong(this.createTime);
        dest.writeString(this.salerNo);
        dest.writeString(this.detailAddress);
        dest.writeString(this.declarationStatus);
        dest.writeString(this.id);
        dest.writeString(this.customerMobile);
        dest.writeList(this.maintenanceRecords);
    }

    public RepairRecord() {
    }

    protected RepairRecord(Parcel in) {
        this.country = in.readString();
        this.zipCode = in.readString();
        this.robotNo = in.readString();
        this.salerName = in.readString();
        this.declarationMemo = in.readString();
        this.city = in.readString();
        this.declarationNo = in.readString();
        this.customerName = in.readString();
        this.robotImgUrl = in.readString();
        this.imgResource = in.readParcelable(ImgResourceBean.class.getClassLoader());
        this.resourceIdList = new ArrayList<>();
        in.readStringList(this.resourceIdList);
        this.projectNo = in.readString();
        this.distirct = in.readString();
        this.createTime = in.readLong();
        this.salerNo = in.readString();
        this.detailAddress = in.readString();
        this.declarationStatus = in.readString();
        this.id = in.readString();
        this.customerMobile = in.readString();
        this.maintenanceRecords = new ArrayList<MaintenanceRecordsBean>();
        in.readList(this.maintenanceRecords, MaintenanceRecordsBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<RepairRecord> CREATOR = new Parcelable.Creator<RepairRecord>() {
        @Override
        public RepairRecord createFromParcel(Parcel source) {
            return new RepairRecord(source);
        }

        @Override
        public RepairRecord[] newArray(int size) {
            return new RepairRecord[size];
        }
    };
}
